package com.project_doctor.handler;


import com.project_doctor.code.ResultCode;
import com.project_doctor.exception.DockerBusinessException;

public class Assert {
    /**
     * 断言方法
     *
     * @param condition  如果条件成立则抛出异常
     * @param resultCode 异常错误码对象
     */
    public static void error(boolean condition, ResultCode resultCode) {
        if (condition) {
            throw new DockerBusinessException(resultCode);
        }
    }
}